import store from '@/store'

/**
 * 判断按钮是否有权限
 *
 * @param  {...string} permissions
 * @returns
 */
export function hasPermission(...permissions) {
  const auths = new Set(store.getters.permission_auths)
  return permissions.some((val) => auths.has(val))
}
